(1). Field of the Invention
The present invention pertains to communication between a computer and external peripheral devices over serial and parallel ports. More particularly, the invention relates to a method and an apparatus for attaching multiple logical peripheral devices to a single serial or parallel port and for multiple software applications to access these devices in an interleaved fashion.
(2) Prior Art
Typically, the connection between a computer and one or more peripheral devices is standardized as illustrated in FIGS. 1a-1c. The most common standard interfaces are serial ports and parallel ports. With the increase in the number of peripheral devices available for interfacing with a computer, a need to increase the interface capability between multiple applications running on the computer and the one or more peripheral devices has arisen.
From the computer point of view, the software running on the computer has become more sophisticated to accommodate the various external devices connected. Windows.RTM. for example is capable of detecting which application is using the computer's serial or parallel port. When more than one task is being performed on a computer at once, the operating system running on the computer, such as Windows.RTM., attempts to monitor or keep track of who is using what resources. The operating system, for example, would not let two applications in the default state write to the same serial port unless this monitoring process was disabled.
Thus, the problem with existing interface techniques is that multiple applications running on a computer may only access the same peripheral device serially, one after the other. Therefore, the applications may not use the same peripheral device simultaneously or even in an interleaved or alternating mode since there is no method of identifying the data crossing the I/O port interfacing the applications with the peripheral devices.
FIG. 1a is a block diagram of an exemplary prior art system. Personal computer (PC) 100 has CPU 102 coupled to memory 104 and serial port 106 coupled to peripheral device 108, allowing communication between PC 100 and peripheral device 108.
FIG. 1b shows a conceptual flow of data between different layers of software, namely, BIOS 110, operating system 112 and application software 114 running on PC 100 referenced FIG. 1a without the implementation of the present invention. Each layer of software contains instructions which are executed on CPU 102 causing state changes in CPU 102 and in the contents of memory 104. Across the boundaries labeled C, D and E passes the flow of control of PC 100 as CPU 102 executes instructions from the different layers of software. At any given moment, CPU 102 is therefore executing a single stream of instruction from one layer of software or another.
Across boundary B, CPU 102 activates a peripheral circuitry to receive or transmit data from memory 104 to serial port 106 (parallel port or other peripheral devices), either directly or through internal registers of CPU 102. Across boundary A, data leaves PC 100 and is transmitted according to the I/O device being used, in this case serial port 106. A commonly used convention for serial ports include the IEEE standard RS-232 conventions. The data is then transmitted to an external peripheral device such as a modem.
Multiple software components may only access the same peripheral device serially, one after the other. Thus, as mentioned earlier, the components may not use the same peripheral device simultaneously or even in an interleaved or alternating mode since there is no method of identifying the data crossing boundary A. Similarly where only one physical device can be attached to the serial port (or the parallel port) at any given time, the components may not use the same peripheral device simultaneously or even in an interleaved or alternating mode for the same reasons.
FIG. 1c illustrates an example of the data flow to and from a communications application on PC 100 without the implementation of the present invention. In this illustration, the data flow to and from a communications application is to modem 102 for example. Communications application 114 performs a write using DOS services 112. Data may also be written by application 114 directly to serial port 106. This is in the case where the application communicates directly with the serial port hardware. In the case of the application receiving data from a peripheral device, the data sent from the peripheral device causes an interrupt request and the application interrupt handler reads the data from serial port 106.
There are variations to the prior art technique for accommodating the interface between applications running on a computer and peripheral devices coupled to the computer illustrated in FIGS 1a-1c. For example, Windows.RTM. has a user configurable time-out mechanism which prevents access by a second application accessing a serial port until seconds after the last access by a first application. The disadvantage of a user configurable time-out mechanism is that it does not allow multiple applications to run at the same time, nor does it allow multiple peripheral devices to be coupled to the same port.
Adapters are available from Logitech.RTM. which allow a scanner and a printer to be physically attached at the same time to a parallel port. However, these peripheral devices can not be operated at the same time. Furthermore, the peripheral devices must use proprietary software. A similar device is a Xircom.RTM. parallel port ethernet adapter. This device only allows one proprietary device to coexist with one standard parallel printer. In addition, there are devices which may be attached to a parallel port of a computer which implement "sound" functions. The software provided with these devices have no element of simultaneous support for multiple peripheral devices.
Typically, a computer may be coupled to a modem for communicating with an ordinary serial communications program such as Compuserv.RTM., and a pager for communicating with a diary in order to, for example, record an appointment received by the pager. Thus, it is not only sufficient to handle the information going to an interface device from multiple sources but there is a need for a capability allowing for the computer to receive data from the interface device and to transmit the data to multiple applications on the computer.
A method and an apparatus for an interface device allowing the transmittal of different pieces of information to and from a computer to different applications running on the computer at the same time over a single serial or parallel port is desired. The desired method and apparatus would be able to support multiple proprietary and standard devices in many configurations.